﻿// Decompiled with JetBrains decompiler
// Type: TaleWorlds.MountAndBlade.View.Scripts.PopupSceneSwitchCameraSequence
// Assembly: TaleWorlds.MountAndBlade.View, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 61152EB8-513B-4D4A-8AC0-0D1465C6CF6C
// Assembly location: D:\steam\steamapps\common\Mount & Blade II Bannerlord\Modules\Native\bin\Win64_Shipping_Client\TaleWorlds.MountAndBlade.View.dll

using TaleWorlds.DotNet;
using TaleWorlds.Engine;

#nullable disable
namespace TaleWorlds.MountAndBlade.View.Scripts
{
  public class PopupSceneSwitchCameraSequence : PopupSceneSequence
  {
    public string EntityName = "";
    private GameEntity _switchEntity;

    protected override void OnInit()
    {
      this._switchEntity = this.GameEntity.Scene.GetFirstEntityWithName(this.EntityName);
    }

    public override void OnInitialState()
    {
      if (!((NativeObject) this._switchEntity != (NativeObject) null))
        return;
      this.GameEntity.Scene.FindEntityWithTag("customcamera")?.RemoveTag("customcamera");
      this._switchEntity.AddTag("customcamera");
    }

    public override void OnPositiveState()
    {
    }

    public override void OnNegativeState()
    {
    }
  }
}
